﻿using AutoMapper;
using Ducu.BLL.Entity;
using Task = Ducu.SRV.ViewModel.Task;
using Entity = Ducu.BLL.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ducu.SRV.ViewModel.Shared;
using Shared = Ducu.SRV.ViewModel.Task.Shared;

namespace Ducu.SRV.ProdService.ViewModelMap
{
    internal class TaskModelMap
    {
        internal static void Init()
        {
            sharedInit();

            Mapper.CreateMap<Task.Shared._TaskItemModel, Entity.Task>();
            Mapper.CreateMap<Entity.Task, Task.Shared._TaskItemModel>();

            Mapper.CreateMap<Entity.Task, Task.FulfilShowItemModel>();


            Mapper.CreateMap<Task.AcceptModel, Entity.HistoryItem>();
            Mapper.CreateMap<Entity.HistoryItem, Task.AcceptShowItemModel>();
        }

        private static void sharedInit()
        { 
            Mapper.CreateMap<Entity.Task, Shared._DayModel>();
        }
    }
}
